package demo1;

public class CoolBoy {
    //普通成员变量
    private String name;//封装起来的字段提供getset方法
    private int age;
    public int hight;

    public CoolBoy() {//默认的构造方法
        System.out.println("ddd");
    }

    public CoolBoy(String name, int age, int hight) {//带有三个参数的构造方法
        this.name = name;
        this.age = age;
        this.hight = hight;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    //普通成员方法
    public void singSong() {
        System.out.println(this.name+"在唱歌");
    }

    public void func() {
        this.singSong();
    }
}
